package io.github.chutian0610.sqlparser.token

import io.github.chutian0610.sqlparser.Location
import io.kotest.core.spec.style.StringSpec
import io.kotest.matchers.shouldBe

class TokenizerErrorTest : StringSpec({
    "test tokenize error" {
        val tokenizerError = TokenizerError(Location(1, 1), "test error")
        tokenizerError.toString() shouldBe "TokenizerError[test error at Line:1,Column:1]"
        val tokenizerError2 = tokenizerError.at(Location(2, 2))
        tokenizerError2.toString() shouldBe "TokenizerError[test error at Line:2,Column:2]"
    }
})